<% if Setting.has_module? :github %>
<div class="card d-md-none d-lg-block hidden-mobile" id="user_github_repos">
  <% if not user.github.blank? %>
    <div class="card-header">GitHub Public Repos</div>
    <ul class="list-group list-group-flush">
      <% user.github_repositories.each do |item| %>
      <li class="list-group-item">
        <div class="title">
          <%= link_to truncate(item[:name], length: 25), item[:url], target: "_blank", rel: "nofollow" %>
          <span class="watchers" title="<%= item[:watchers] %> Watchers"><%= item[:watchers] %></span>
        </div>
        <p class="desc">
          <%= truncate(item[:description], length: 100)  %>
      </li>
      <% end %>
    </ul>
    <div class="card-footer more">
      <%= link_to "More on GitHub", user.github_url, target: "_blank", rel: "nofollow" %>
    </div>
  <% else %>
    <div class="card-body">
      <%= t("users.no_github") %>
    </div>
  <% end %>
</div>
<% end %>
